package com.sxbbc.common.core.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sxbbc.common.core.entity.jz.BFreezeMoneyDetail;
import com.sxbbc.common.core.enums.FreezeStatusEnums;
import com.sxbbc.common.core.enums.HandleTypeEnums;
import com.sxbbc.common.core.mapper.jz.BFreezeMoneyDetailMapper;
import com.sxbbc.common.core.service.IBFreezeMoneyDetailService;

/**
 * <p>
 * 店铺冻结金额明细表 服务实现类
 * </p>
 *
 * @author xiaoky
 * @since 2019-07-14
 */
@Service
public class BFreezeMoneyDetailServiceImpl extends ServiceImpl<BFreezeMoneyDetailMapper, BFreezeMoneyDetail> implements IBFreezeMoneyDetailService {

	@Override
	public IPage<BFreezeMoneyDetail> queryBusinessFreezeMoneyDetail(IPage<BFreezeMoneyDetail> page,
			BFreezeMoneyDetail detail) {
		baseMapper.queryBusinessFreezeMoneyList(page, detail);
		for (BFreezeMoneyDetail d:page.getRecords()) {
			d.setTypeName(HandleTypeEnums.getName(d.getTypeId()));
			d.setStatusName(FreezeStatusEnums.getName(d.getStatus()));
			d.setBid(null);
		}
		return page;
	}

}
